int stringToInt (const char *buffer) {
	int intParsed = 0;
	
	while(*buffer) {
		intParsed *= 10;
		intParsed += (int)(*buffer - '0');
		buffer++;
	}
	return intParsed;
}

void intToString (int value, char* destination) {
	int lastDigit;

	if (value < 0) {
		*destination++ = '-';
		value = -value;
	}

	do {
		lastDigit = value%10;
		value /= 10;

		*destination++ = lastDigit + '0';
	} while (value != 0);
	*destination = '\0';
}
